package com.wandian.game
{
		import flash.display.*;
		import flash.events.*;
		import flash.net.*;
		import flash.utils.*;		
		public class ReelsDispatcher extends EventDispatcher
		{
			private var clickMeChoice:Number = -1;
			private var bRoundCollectChecked:Boolean = false;
			private var fOnWinShowedHandler_func:Function;
			private var gameDisp:GameDispatcher;
			private var gameData:GameData;
			private var fOnSpinStoppedHandler_func:Function;
			private var fSpinInProgress_bl:Boolean = false;
			private var mainReels:MovieClip;
			private var timeoutId:Number;
			public var nWinPeriod:Number;
			public static const EVENT_FREE_SPINS_INTRO_ANIMATION_COMPLETED:String = "onFreeSpinsIntroAnimationCompleted";
			public static const EVENT_WIN_PRESENTATION_STARTED:String = "onWinPresentationStarted";
			public static const EVENT_PARROT_WINGBEAT:String = "onParrotWingbeat";
			public static const EVENT_SPIN_STARTED:String = "onSpinStarted";
			public static const EVENT_WIN_PRESENTATION_COMPLETED:String = "onWinPresentationCompleted";
			public static const EVENT_CLICKME_DEPP_FLYING_ANIMATION_STARTED:String = "onClickMeDeppFlyingAnimationStarted";
			public static const EVENT_WIN_LINE_PRIMARY_ICON_SIZE_DECREASING_STARTED:String = "onIconSizeDecreasingStarted";
			public static const EVENT_CLICK_ME_BONUS_STARTED:String = "onClickMeBonusStarted";
			public static const EVENT_WILD_REEL_SECOND_SHOT:String = "onWildReelSecondShot";
			public static const EVENT_CLICKME_DEPP_FLYING_ANIMATION_COMPLETED:String = "onClickMeDeppFlyingAnimationCompleted";
			public static const ICON_ID_SKULL:String = "Skull";
			public static const EVENT_WIN_LINE_PRIMARY_ICON_ANIMATION_STARTED:String = "onIconAnimationStarted";
			public static const EVENT_HANDGUN_FIRE:String = "onHandgunIconFire";
			public static const EVENT_WILD_REEL_BONUS_INTRO_COMPLETED:String = "onWildReelBonusIntroCompleted";
			public static const EVENT_SKYLLSWORD_LOOP:String = "onSkyllswordLoop";
			public static const ICON_ID_BARREL:String = "Barrel";
			public static const EVENT_WIN_LINE_PRIMARY_ICON_ANIMATION_COMPLETED:String = "onIconAnimationFinished";
			public static const EVENT_FREE_SPINS_PARROT_CHATTER:String = "onFreeSpinsParrotChatter";
			public static const EVENT_CHEST_LOOP:String = "onChestLoop";
			public static const EVENT_REEL_SPIN_STOPPED:String = "onReelSpinStopped";
			public static const EVENT_SWORD_FIGHT_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED:String = "onSwordFightBonusWinCombinationPresentationCompleted";
			public static const EVENT_FREE_SPINS_COMPLETE_ANIMATION_STARTED:String = "onFreeSpinsCompleteAnimationStarted";
			public static const EVENT_WIN_PRESENTATION_INTERRUPTED:String = "onWinPresentationInterrupted";
			public static const EVENT_WILD_REEL_PANEL_BROKING_STARTED:String = "onWildReelPanelBrokingStarted";
			public static const EVENT_CLICKME_COLLECT_WIN_ANIMATION_STARTED:String = "onClickMeCollectWinAnimationStarted";
			public static const EVENT_FREE_SPINS_BONUS_COMPLETED:String = "onFreeSpinsBonusCompleted";
			public static const EVENT_SPIN_STOPPED:String = "onSpinStopped";
			public static const ICON_ID_COMPASS:String = "Compass";
			public static const EVENT_COMPAS_LOOP:String = "onCompasLoop";
			public static const EVENT_WIN_LINE_PRIMARY_ICON_ANIMATION_INTERRUPTED:String = "onIconAnimationInterrupted";
			public static const ICON_ID_CANNON:String = "Cannon";
			public static const EVENT_REELS_READY_FOR_REELS_INITIALIZATION:String = "onReelsReadyForTheReelsInitialization";
			public static const EVENT_COINS_FALL_ANIMATION_STARTED:String = "onIconCoinsFallAnimationStarted";
			public static const EVENT_SWORD_FIGHT_BONUS_WIN_COMBINATION_PRESENTATION_STARTED:String = "onSwordFightBonusWinCombinationPresentationStarted";
			public static const EVENT_WILD_REEL_PANEL_MOVING_STARTED:String = "onWildReelPanelMovingStarted";
			public static const EVENT_CANNON_LOOP:String = "onCannonLoop";
			public static const EVENT_CLICKME_ICON_DRAGGING_STARTED:String = "onClickMeIconDraggingStarted";
			public static const EVENT_PARROT_FLYING_STARTED:String = "onParrotFlyingStarted";
			public static const EVENT_HANDGUN_LOOP:String = "onHandgunLoop";
			public static const EVENT_WILD_REEL_DOCKWORKER_FOOTSTEP:String = "onWildReelDockworkerFootstep";
			public static const EVENT_MAP_DAGGER_MOVING_STARTED:String = "onDaggerMovingStarted";
			public static const EVENT_WILD_REEL_BONUS_INTRO_ANIMATION_STARTED:String = "onWildReelBonusIntroAnimationStarted";
			public static const EVENT_ICON_MAIDEN_SIGH_STARTED:String = "onIconMaidenSighStarted";
			public static const EVENT_WORKER_LOOP:String = "onWorkerLoop";
			public static const EVENT_CANNON_ICON_CANNON_SHOT:String = "onCannonIconCannonShot";
			public static const EVENT_ICON_WORKER_BARREL_THUD:String = "onIconWorkerBarrelThud";
			public static const EVENT_WILD_REEL_CANNON_TURNING_COMPLETED:String = "onWildReelCannonTurningCompleted";
			public static const EVENT_FREE_SPINS_BONUS_STARTED:String = "onFreeSpinsBonusStarted";
			public static const EVENT_MAP_DAGGER_HIT:String = "onDaggerHit";
			public static const EVENT_ICON_WORKER_SPEECH_STARTED:String = "onIconWorkerSpeechStarted";
			public static const EVENT_WILD_REEL_BONUS_STARTED:String = "onWildReelBonusStarted";
			public static const EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_STARTED:String = "onWorkerGrogBonusWinCombinationPresentationStarted";
			public static const EVENT_REEL_SPIN_STOP_BOUNCE_STARTED:String = "onReelStopBounceStarted";
			public static const ICON_ID_CAPTAIN:String = "Captain";
			public static const EVENT_WILD_REEL_DOCKWORKER_SPEECH_STARTED:String = "onWildReelDockworkerSpeechStarted";
			public static const EVENT_ICON_CAPTAIN_VOX_STARTED:String = "onCaptainIconVoxStarted";
			public static const EVENT_CLICK_ME_BONUS_COMPLETED:String = "onClickMeBonusCompleted";
			public static const EVENT_CAPTAIN_LOOP:String = "onCaptainLoop";
			public static const EVENT_GOLD_LOOP:String = "onGoldLoop";
			public static const EVENT_MAIDEN_LOOP:String = "onMaidenLoop";
			public static const ICON_ID_MAP:String = "Map";
			public static const ICON_ID_HANDGUN:String = "HandGun";
			public static const EVENT_WILD_REEL_CANNON_FUSE_STARTED:String = "onWildReelCannonFuseStarted";
			public static const EVENT_BARREL_ICON_LIQUID_STARTED:String = "onIconBarrelLiquidAnimationStarted";
			public static const ICON_ID_CHEST:String = "Chest";
			public static const ICON_ID_COINS:String = "Coins";
			public static const EVENT_CLICKME_ICON_CLICKED:String = "onClickMeIconClicked";
			public static const EVENT_ICON_SKULL_SPEECH_STARTED:String = "onIconSkullSpeechStarted";
			public static const EVENT_WILD_REEL_FIRST_SHOT:String = "onWildReelFirstShot";
			public static const EVENT_BAREL_LOOP:String = "onBarelLoop";
			public static const EVENT_FREE_SPINS_INTRO_ANIMATION_STARTED:String = "onFreeSpinsIntroAnimationStarted";
			public static const EVENT_STOP_ALL_ICON_MUSIC_LOOP:String = "onStopAllIconMusicLoop";
			public static const EVENT_CLICKME_ICON_PULSING_STARTED:String = "onClickMeIconPulsingStarted";
			public static const EVENT_CLICKME_BONUS_RESET_COMPLETED:String = "onClickMeBonusResetCompleted";
			public static const EVENT_REELS_READY_FOR_TRANSLATION_CONTROLLER_INITIALIZATION:String = "onReelsReadyForTheTranslationControllerInitialization";
			public static const EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED:String = "onWorkerGrogBonusWinCombinationPresentationCompleted";
			public static const EVENT_CLICKME_ICON_INTRO_ANIMATION_COMPLETED:String = "onClickMeIconIntroAnimationCompleted";
			public static const ICON_ID_WORKER:String = "Worker";
			public static const EVENT_WIN_LINE_PRESENTATION_STARTED:String = "onWinLinePresentationStarted";
			public static const EVENT_PARROT_SPEECH_STARTED:String = "onParrotSpeechStarted";
			public static const EVENT_COMPASS_COVER_CLOSED:String = "onCompasCoverClosed";
			public static const EVENT_MAP_LOOP:String = "onMapLoop";
			public static const EVENT_MAP_FINGER_TAP:String = "onFingerTap";
			public static const ICON_ID_MAIDEN:String = "Maiden";
			public static const EVENT_WILD_REEL_CANNON_TURNING_STARTED:String = "onWildReelCannonTurningStarted";
			
			public function ReelsDispatcher(param1:GameDispatcher)
			{
				clickMeChoice = -1;
				bRoundCollectChecked = false;
				fSpinInProgress_bl = false;
				this.gameDisp = param1;
				return;
			}// end function
			
			public function get lastStoppedReelId() : int
			{
				return this.mainReels.lastStoppedReelId;
			}// end function
			
			public function init(param1:XML) : void
			{
				gameData = GameData.getInstance();
				mainReels.setParent(this);
				mainReels.setParams(param1);
				mainReels.init(gameData.initReels, ParamsSpecification.isCreditsDisplay);
				trace("VISIBLE TRUE");
				visible(true);
				mainReels.addEventListener(EVENT_SPIN_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_SPIN_STOPPED, this.onSpinStopped);
				mainReels.addEventListener(EVENT_REEL_SPIN_STOPPED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_REEL_SPIN_STOP_BOUNCE_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WIN_PRESENTATION_COMPLETED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WIN_PRESENTATION_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WIN_PRESENTATION_INTERRUPTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WIN_LINE_PRESENTATION_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WIN_LINE_PRIMARY_ICON_ANIMATION_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WIN_LINE_PRIMARY_ICON_SIZE_DECREASING_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CLICKME_ICON_INTRO_ANIMATION_COMPLETED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CLICK_ME_BONUS_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CLICK_ME_BONUS_COMPLETED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CLICKME_BONUS_RESET_COMPLETED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CLICKME_COLLECT_WIN_ANIMATION_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CLICKME_DEPP_FLYING_ANIMATION_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CLICKME_DEPP_FLYING_ANIMATION_COMPLETED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CLICKME_ICON_DRAGGING_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_FREE_SPINS_INTRO_ANIMATION_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_FREE_SPINS_INTRO_ANIMATION_COMPLETED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_FREE_SPINS_PARROT_CHATTER, this.dispatchEvent);
				mainReels.addEventListener(EVENT_FREE_SPINS_COMPLETE_ANIMATION_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WILD_REEL_BONUS_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WILD_REEL_BONUS_INTRO_ANIMATION_STARTED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WILD_REEL_BONUS_INTRO_COMPLETED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WILD_REEL_CANNON_TURNING_COMPLETED, this.dispatchEvent);
				mainReels.addEventListener(EVENT_BAREL_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CANNON_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CAPTAIN_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_CHEST_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_COMPAS_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_GOLD_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_HANDGUN_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_MAIDEN_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_MAP_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_SKYLLSWORD_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_STOP_ALL_ICON_MUSIC_LOOP, this.dispatchEvent);
				mainReels.addEventListener(EVENT_WORKER_LOOP, this.dispatchEvent);
				this.freeSpinsBonusController.addEventListener(EVENT_FREE_SPINS_BONUS_STARTED, this.dispatchEvent);
				return;
			}// end function
			
			public function checkCollect()
			{
				return;
			}// end function
			
			public function betMax()
			{
				gameData.selectedLines = Const.LINES_COUNT;
				gameData.betCoins = Const.MAX_BET_PER_LINE;
				mainReels.selectLines(gameData.selectedLines);
				mainReels.betOne(gameData.betCoins);
				gameDisp.update();
				return;
			}// end function
			
			public function betOne()
			{
				var _loc_1:Number = NaN;
				_loc_1 = mainReels.tryBetOne();
				if (CustomerSpecification.getCustomerId() == CustomerSpecification.CUSTOMER_ID_FINSOFT)
				{
					gameData.betCoins = _loc_1;
					mainReels.betOne(gameData.betCoins);
					gameDisp.update();
					return;
				}
				if (!gameDisp.isBetAcceptable(_loc_1, gameData.selectedLines, gameData.selectedCoin))
				{
					_loc_1 = 1;
				}
				if (gameDisp.isBetAcceptable(_loc_1, gameData.selectedLines, gameData.selectedCoin))
				{
					gameData.betCoins = _loc_1;
					mainReels.betOne(gameData.betCoins);
					gameDisp.update();
					return;
				}
				resetBetOne();
				gameDisp.update();
				gameDisp.showDialogNotEnoughMoneyForTheBet();
				return;
			}// end function
			
			public function get reelsReadyForInit() : Boolean
			{
				return this.mainReels.readyForReelsInit;
			}// end function
			
			public function stopSwordFightBonusWinCombinationPresentation() : void
			{
				mainReels.stopWin();
				return;
			}// end function
			
			public function initReelsTC() : void
			{
				this.mainReels.externTranslationController = TranslationController.getInstance();
				return;
			}// end function
			
			public function get winPresentationPeriod() : int
			{
				return this.nWinPeriod;
			}// end function
			
			public function onBetStructureChanged() : void
			{
				mainReels.betOne(0);
				mainReels.selectLines(0);
				mainReels.selectLines(gameData.selectedLines);
				mainReels.betOne(gameData.betCoins);
				mainReels.hideAllLines();
				return;
			}// end function
			
			private function onReelsLoaded(event:Event) : void
			{
				mainReels = event.target.content;
				mainReels.addEventListener(EVENT_REELS_READY_FOR_TRANSLATION_CONTROLLER_INITIALIZATION, this.dispatchEvent);
				mainReels.addEventListener(EVENT_REELS_READY_FOR_REELS_INITIALIZATION, this.dispatchEvent);
				gameDisp.onReelsLoaded(true);
				return;
			}// end function
			
			public function get clickMeBonusInProgress() : Boolean
			{
				return mainReels.clickMeBonusInProgress;
			}// end function
			
			private function onWorkerGrogBonusWinCombPresentationCompleted(event:Event) : void
			{
				mainReels.removeEventListener(EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED, this.onWorkerGrogBonusWinCombPresentationCompleted);
				mainReels.removeEventListener(EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_STARTED, this.dispatchEvent);
				this.dispatchEvent(event);
				return;
			}// end function
			
			public function convertCreditsToMoney(param1:Number) : String
			{
				return gameDisp.getConvertedCredits(param1);
			}// end function
			
			public function showWin(param1:Boolean, param2:Function = null)
			{
				var _loc_3:Array = null;
				trace("ReelsDispatcher.showWin() started...");
				this.fOnWinShowedHandler_func = param2;
				trace("ReelsDispatcher.showWin(): fOnWinShowedHandler_func = " + this.fOnWinShowedHandler_func);
				if (param1)
				{
					var _loc_5:* = nWinPeriod + 1;
					nWinPeriod = _loc_5;
					if (nWinPeriod == 2)
					{
						checkWinPercent();
					}
					if (gameData.getTotalPayout() > 0)
					{
						_loc_3 = [];
						_loc_3.push(gameData.ipayout3);
						_loc_3.push(gameData.ipayout4);
						_loc_3.push(gameData.ipayout5);
						mainReels.startStandardWinPresentation(gameData.winLines, _loc_3);
					}
				}
				else
				{
					stopAllSoundIcon();
					mainReels.stopWin();
				}
				trace("...ReelsDispatcher.showWin() completed");
				return;
			}// end function
			
			public function get winController() : EventDispatcher
			{
				return mainReels.winController;
			}// end function
			
			public function continueClickMeBonus(param1:Function, param2:Array) : void
			{
				mainReels.continueClickMeBonus(param1, param2);
				return;
			}// end function
			
			private function onSwordFightBonusWinCombinationPresentationCompleted(event:Event) : void
			{
				mainReels.removeEventListener(EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED, this.onSwordFightBonusWinCombinationPresentationCompleted);
				mainReels.removeEventListener(EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_STARTED, this.dispatchEvent);
				this.dispatchEvent(event);
				return;
			}// end function
			
			public function get spinStopped() : Boolean
			{
				return !this.fSpinInProgress_bl;
			}// end function
			
			public function resetClickMeBonus() : void
			{
				mainReels.resetClickMeBonus();
				return;
			}// end function
			
			public function onBetStructureRestored() : void
			{
				mainReels.selectLines(0);
				mainReels.betOne(0);
				mainReels.selectLines(gameData.selectedLines);
				mainReels.betOne(gameData.betCoins);
				gameDisp.update();
				return;
			}// end function
			
			public function onWinPeriodFinished()
			{
				trace("ON WIN PERIOD FINISHED");
				if (Boolean(this.fOnWinShowedHandler_func))
				{
					this.fOnWinShowedHandler_func();
				}
				return;
			}// end function
			
			public function get currentWinLineId() : int
			{
				return this.mainReels.currentWinLineId;
			}// end function
			
			public function startSwordFightBonusWinCombinationPresentation(param1:Array) : void
			{
				mainReels.addEventListener(EVENT_SWORD_FIGHT_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED, this.onSwordFightBonusWinCombinationPresentationCompleted);
				mainReels.addEventListener(EVENT_SWORD_FIGHT_BONUS_WIN_COMBINATION_PRESENTATION_STARTED, this.dispatchEvent);
				this.nWinPeriod = 1;
				mainReels.startSwordFightBonusWinCombinationPresentation(param1);
				return;
			}// end function
			
			public function startWildReelBonus(param1:Function) : void
			{
				mainReels.startWildReelBonus(param1);
				return;
			}// end function
			
			public function get clickMeBonusController() : EventDispatcher
			{
				return mainReels.clickMeBonusController;
			}// end function
			
			public function get currentWinLinePayout() : int
			{
				return this.mainReels.currentWinLinePayout;
			}// end function
			
			public function get reelsReadyForTCInit() : Boolean
			{
				return this.mainReels.readyForTranslationControllerInit;
			}// end function
			
			public function startClickMeBonus(param1:Function, param2:Array, param3:Array) : void
			{
				mainReels.startClickMeBonus(param1, param2, param3);
				return;
			}// end function
			
			public function startFreeSpinsBonus(param1:Function, param2:Array, param3:Number) : void
			{
				mainReels.startFreeSpinsBonus(param1, param2, param3);
				return;
			}// end function
			
			public function resetBetOne()
			{
				gameData.betCoins = 0;
				mainReels.betOne(gameData.betCoins);
				return;
			}// end function
			
			public function stopToShowStandardWin() : void
			{
				trace("ReelsDispatcher::stopToShowStandartWin() started...");
				this.showWin(false);
				trace("...ReelsDispatcher::stopToShowStandartWin() completed");
				return;
			}// end function
			
			public function continueFreeSpinsBonus(param1:Function, param2:Number, param3:Number) : void
			{
				mainReels.continueFreeSpinsBonus(param1, param2, param3);
				return;
			}// end function
			
			public function setVisibleReels(param1:Boolean) : void
			{
				if (this.mainReels != null)
				{
					this.mainReels.visible = param1;
				}
				return;
			}// end function
			
			public function startSpin()
			{
				if (!gameData.bAutoState)
				{
					gameDisp.disableButtonAutoPlay();
				}
				this.fSpinInProgress_bl = true;
				nWinPeriod = 0;
				bRoundCollectChecked = false;
				mainReels.selectLines(gameData.selectedLines);
				mainReels.startSpin();
				gameDisp.setFrameRate(20);
				return;
			}// end function
			
			public function onSpinStopped(event:Event) : void
			{
				this.fSpinInProgress_bl = false;
				this.dispatchEvent(new Event(EVENT_SPIN_STOPPED));
				if (Boolean(this.fOnSpinStoppedHandler_func))
				{
					this.fOnSpinStoppedHandler_func();
				}
				else
				{
					gameDisp.setState(GameData.STATE_RESULT);
				}
				gameDisp.setFrameRate();
				return;
			}// end function
			
			public function stopWorkerGrogBonusWinCombinationPresentation() : void
			{
				mainReels.stopWin();
				return;
			}// end function
			
			public function get freeSpinsBonusInProgress() : Boolean
			{
				return mainReels.freeSpinsBonusInProgress;
			}// end function
			
			private function onReelsLoadProgress(event:ProgressEvent) : void
			{
				var _loc_2:Number = NaN;
				_loc_2 = Math.round(100 * event.bytesLoaded / event.bytesTotal);
				gameDisp.onReelsLoadProgress(_loc_2);
				return;
			}// end function
			
			public function stopAllSoundIcon() : void
			{
				this.dispatchEvent(new Event(EVENT_STOP_ALL_ICON_MUSIC_LOOP));
				return;
			}// end function
			
			public function get curWinLinePrimaryIconAnimation() : EventDispatcher
			{
				return mainReels.curWinLinePrimaryIconAnimation;
			}// end function
			
			public function get lastBouncedReelId() : int
			{
				return this.mainReels.lastBouncedReelId;
			}// end function
			
			public function stopSpin(param1:Function = null)
			{
				clearTimeout(timeoutId);
				this.fOnSpinStoppedHandler_func = param1;
				if (CustomerSpecification.getCustomerId() != CustomerSpecification.CUSTOMER_ID_FINSOFT)
				{
					timeoutId = setTimeout(mainReels.stopSpin, 600, gameData.stopReels);
				}
				else
				{
					timeoutId = setTimeout(mainReels.stopSpin, Const.SPIN_DELAY_FS, gameData.stopReels);
				}
				return;
			}// end function
			
			public function get wildReelBonusInProgress() : Boolean
			{
				return this.mainReels.wildReelBonusInProgress;
			}// end function
			
			public function load()
			{
				var loader:Loader;
				var request:URLRequest;
				loader = new Loader();
				loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onReelsLoaded);
				loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onReelsLoadProgress);
				loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onReelsLoadError);
				request = new URLRequest(Const.getFlashURL(gameDisp.loaderInfo.url) + Const.REELS_URL);
				try
				{
					loader.load(request);
				}
				catch (error:Error)
				{
					onReelsLoadError(null);
				}
				return;
			}// end function
			
			public function startWorkerGrogBonusWinCombinationPresentation(param1:Array) : void
			{
				mainReels.addEventListener(EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_COMPLETED, this.onWorkerGrogBonusWinCombPresentationCompleted);
				mainReels.addEventListener(EVENT_WORKER_GROG_BONUS_WIN_COMBINATION_PRESENTATION_STARTED, this.dispatchEvent);
				this.nWinPeriod = 1;
				mainReels.startWorkerGrogBonusWinCombinationPresentation(param1);
				return;
			}// end function
			
			public function selectLines()
			{
				resetBetOne();
				gameData.selectedLines = mainReels.trySelectLine();
				mainReels.selectLines(gameData.selectedLines);
				gameDisp.update();
				return;
			}// end function
			
			public function onCollectChecked(param1:Boolean)
			{
				return;
			}// end function
			
			public function get wildReelController() : EventDispatcher
			{
				return mainReels.wildReelController;
			}// end function
			
			public function resetLines()
			{
				gameData.selectedLines = 0;
				mainReels.selectLines(gameData.selectedLines);
				return;
			}// end function
			
			private function checkWinPercent() : void
			{
				return;
			}// end function
			
			public function visible(param1:Boolean) : void
			{
				if (param1)
				{
					gameDisp.addChild(mainReels);
				}
				else
				{
					gameDisp.removeChild(mainReels);
				}
				return;
			}// end function
			
			public function resetWildReel() : void
			{
				mainReels.resetWildReel();
				return;
			}// end function
			
			public function get curWinLinePrimaryIconId() : String
			{
				return this.mainReels.curWinLinePrimaryIconId;
			}// end function
			
			public function get freeSpinsBonusController() : EventDispatcher
			{
				return this.mainReels.freeSpinsBonusController;
			}// end function
			
			private function onReelsLoadError(event:Event) : void
			{
				trace("ERROR! REELS NOT FOUND!");
				gameDisp.onReelsLoaded(false);
				return;
			}// end function
			
			public function startToShowStandardWin(param1:Function = null) : void
			{
				this.showWin(true, param1);
				return;
			}// end function
			
		}
	}
